package cn.jnetty.api.exception;

import java.text.MessageFormat;

/**
 * @author 猪哥亮
 * @email 1030681978@qq.com
 * @date 2020/4/10 11:56
 * 描述：
 */
public abstract class AbstactJnettyException extends RuntimeException{
    public AbstactJnettyException(Throwable cause) {
        super(cause);
        throw new RuntimeException(cause);
    }
    public AbstactJnettyException(String message, Throwable cause, Object ... args) {
        if(args != null && args.length > 0){
            message =  MessageFormat.format(message,args);
        }
        throw new RuntimeException(message,cause);
    }
    public AbstactJnettyException(String message, Object ... args) {
        if(args != null && args.length > 0){
            message =  MessageFormat.format(message,args);
        }
        throw new RuntimeException(message);
    }
    public AbstactJnettyException() {
        super();
    }
}
